package cn.wolfcode.trip.api.controller;

import cn.wolfcode.trip.base.domain.Integral;
import cn.wolfcode.trip.base.service.IIntegralService;
import jdk.nashorn.internal.objects.annotations.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("integrals")
public class IntegralController {
    @Autowired
    private IIntegralService integralService;

    @GetMapping
    public Integral get(Long userId){
          return integralService.selectByUserId(userId);
    }
}
